{extend name="pub/base" /}
{block name="title"}
<title>SEO设置</title>
{/block}

{block name="body"}
<div class="Hui-admin-article">
    <nav class="breadcrumb" style="background-color:#fff;padding: 0 24px">
        首页
        <span class="c-gray en">/</span>
        优化设置
        <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
           href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
    </nav>
    <div class="Hui-article">
        <article class="clearfix pd-20">
            <form  class="form form-horizontal">
                <div class="row clearfix">
                    <label class="form-label col-xs-4 col-sm-3">小说URL端点形式：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <select name="book_end_point" class="select">
                            <option value="id"
                                    {if $book_end_point == 'id'}
                            selected
                            {/if}
                            >id</option>
                            <option value="name"
                                    {if $book_end_point == 'name'}
                            selected
                            {/if}
                            >别名</option>
                        </select>
                    </div>
                </div>

                <div class="row clearfix">
                    <label class="form-label col-xs-4 col-sm-3">标签URL端点形式：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <select name="tag_end_point" class="select">
                            <option value="id"
                                    {if $tag_end_point == 'id'}
                            selected
                            {/if}
                            >id</option>
                            <option value="pinyin"
                                    {if $tag_end_point == 'pinyin'}
                            selected
                            {/if}
                            >拼音</option>
                            <option value="jianpin"
                                    {if $tag_end_point == 'jianpin'}
                            selected
                            {/if}
                            >简拼</option>
                        </select>
                    </div>
                </div>

                <div class="row clearfix">
                    <label class="form-label col-xs-4 col-sm-3">站点地图生成数量：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" class="input-text" value="{$sitemap_gen_num}" name="sitemap_gen_num">
                    </div>
                </div>

                <div class="row cl">
                    <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                        <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
                    </div>
                </div>
            </form>
        </article>
    </div>
</div>
<script type="text/javascript">
    $(function(){
        $("form").validate({
            rules:{
                title:{
                    required:true
                },
                book_id:{
                    required:true
                }
            },
            onkeyup:false,
            focusCleanup:false,
            submitHandler: function(form) {
                $.ajax({
                    url:"{:url('seo')}",
                    type:'post',
                    data:$('form').serialize(),
                    success(res) {
                        subResHandle(res)
                    }
                })
            }
        });
    });
</script>
<!--/请在上方写此页面业务相关的脚本-->
{/block}